#******************************************************************************
# Makefile.am (xpc++/src)
#------------------------------------------------------------------------------
##
# \file       	Makefile.am
# \library    	xpc++
# \author     	Chris Ahlstrom
# \date       	2010-05-30
# \updates     2014-04-21
# \version    	$Revision$
# \license    	$XPC_SUITE_GPL_LICENSE$
#
#     This makefile provides the skeleton needed to build the XPC++ library
#     using GNU autotools.
#
#------------------------------------------------------------------------------

#*****************************************************************************
# Packing/cleaning targets
#-----------------------------------------------------------------------------

AUTOMAKE_OPTIONS = foreign dist-zip dist-bzip2
MAINTAINERCLEANFILES = Makefile.in Makefile $(AUX_DIST)

#*****************************************************************************
# CLEANFILES includes stuff generated by the coverage/profiling options.
#-----------------------------------------------------------------------------

CLEANFILES = *.gc*

#******************************************************************************
# 	EXTRA_DIST
#------------------------------------------------------------------------------

EXTRA_DIST =

#*****************************************************************************
# Import version macros from configure.ac
#-----------------------------------------------------------------------------

PACKAGE = @PACKAGE@
VERSION = @VERSION@

XPC_API_MAJOR = @XPC_API_MAJOR@
XPC_API_MINOR = @XPC_API_MINOR@
XPC_API_PATCH = @XPC_API_PATCH@
XPC_API_VERSION = @XPC_API_VERSION@

XPC_LT_CURRENT = @XPC_LT_CURRENT@
XPC_LT_REVISION = @XPC_LT_REVISION@
XPC_LT_AGE = @XPC_LT_AGE@

#******************************************************************************
# Install directories
#------------------------------------------------------------------------------

prefix = @prefix@
libdir = @xpclibdir@
datadir = @datadir@
datarootdir = @datarootdir@
xpclibdir = @xpclibdir@
xpcdocdir = @xpcdocdir@
xpcdoxygendir = @xpcdoxygendir@
xpcincludedir = @xpcincludedir@

#******************************************************************************
# localedir
#------------------------------------------------------------------------------
#
#  'localedir' is the normal system directory for installed localization
#  files.
#
#------------------------------------------------------------------------------

localedir = $(datadir)/locale
DEFS = -DLOCALEDIR=\"$(localedir)\" @DEFS@

#******************************************************************************
# Local project directories
#------------------------------------------------------------------------------

top_srcdir = @top_srcdir@
builddir = @abs_top_builddir@

#*****************************************************************************
# libtool
#-----------------------------------------------------------------------------
#
#     GNU automake assigns, for us: LIBTOOL_DEPS = @LIBTOOL_DEPS@
#
#-----------------------------------------------------------------------------
#
# LIBTOOL_DEPS = @LIBTOOL_DEPS@
#
# libtool: $(LIBTOOL_DEPS)
#    $(SHELL) ./scripts/config.status --recheck
#
#-----------------------------------------------------------------------------

version = $(XPC_API_MAJOR):$(XPC_API_MINOR):$(XPC_API_PATCH)

#******************************************************************************
# AM_CPPFLAGS [formerly "INCLUDES"]
#------------------------------------------------------------------------------
#
#		Defines where to look for header files.  If we build from the
#		xpc_suite root directory, then $top_srcdir is "../.."; if we build
#		from the xpc++ directory, then it is "..".
#
#------------------------------------------------------------------------------

AM_CPPFLAGS = \
 -I$(top_srcdir)/include \
 -I$(top_srcdir)/xpc/include \
 -I$(top_srcdir)/xpc++/include \
 -I../../include

#******************************************************************************
# Building the library
#------------------------------------------------------------------------------
#
# 		We put library files in the src directory.
#
# 		The static library setup is not needed, since libtool also builds the
#		static version.
#
# Question:
#
# 		Do we want to bundle the CPP build of libxpc into this library?
#
#------------------------------------------------------------------------------

lib_LTLIBRARIES = libxpc++.la

libxpc___la_SOURCES =   \
   averager.cpp         \
   binstring.cpp        \
   errorlog.cpp         \
	initree.cpp				\
	rowset.cpp				\
	stringmap.cpp        \
   systemtime.cpp

#******************************************************************************
# LDFLAGS = -version-info 1:0:0
#------------------------------------------------------------------------------
#
#  Defined in configure.ac
#
#------------------------------------------------------------------------------

libxpc___la_LDFLAGS = -version-info $(version)

show:
	@echo "top_srcdir = $(top_srcdir)"

#******************************************************************************
# DEPENDENCIES
#------------------------------------------------------------------------------
#
# libxpc___la_DEPENDENCIES = $(builddir)/xpccut/src/libxpccut.la
#
#------------------------------------------------------------------------------

#******************************************************************************
# uninstall-hook
#------------------------------------------------------------------------------
#
#     We'd like to remove /usr/local/include/xpc-1.0 if it is
#     empty.  However, we don't have a good way to do it yet.
#
#------------------------------------------------------------------------------

uninstall-hook:
	@echo "Note:  you may want to remove $(libdir) manually"

#******************************************************************************
# Makefile.am (xpc++/src)
#------------------------------------------------------------------------------
# Local Variables:
# End:
#------------------------------------------------------------------------------
# vim: ts=3 sw=3 ft=automake
#------------------------------------------------------------------------------
